from rest_framework import serializers
from .models import SKUImage
class ImageSer(serializers.ModelSerializer):
    sku_name = serializers.SerializerMethodField(read_only=True)
    def get_sku_name(self,obj):
        return obj.sku.name
    class Meta:
        model = SKUImage
        fields = '__all__'
